-- 提取固定值
local exitcode, stdout = winapi.execute([["bcdedit /copy {bootmgr} /d "8899.efi"]])
bootfile_id = string.match(stdout, "{(%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x)}")
			exec("/hide /wait",
			[[bcdedit /set "{]] .. bootfile_id .. [[}" device partition=B:]])

			exec("/hide /wait",
             [[bcdedit /set "{]] .. bootfile_id .. [[}" path \EFI\Boot\grubfmx64.efi]])
			 exec("/hide /wait",
             [[bcdedit /deletevalue "{]] .. bootfile_id .. [[}" locale]])
			 	 exec("/hide /wait",
             [[bcdedit /deletevalue "{]] .. bootfile_id .. [[}" inherit]])
			 	 exec("/hide /wait",
             [[bcdedit /deletevalue "{]] .. bootfile_id .. [[}" default]])
			 	 exec("/hide /wait",
             [[bcdedit /deletevalue "{]] .. bootfile_id .. [[}}" displayorder]])
			 	 exec("/hide /wait",
             [[bcdedit /deletevalue "{]] .. bootfile_id .. [[}}" timeout]])
			 	 exec("/hide /wait",
             [[bcdedit /set {fwbootmgr} "{]] .. bootfile_id .. [[}" /addlast ]])
			 
			

alert(bootfile_id)
